import request from '../utils/request'

export function getdepartments() {
  return request({
    url: '/company/department'
  })
}

export function deldepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

export function adddepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// /getDepartmentDetail
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

export function editdepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
